<?php
/**
 * Interface of base repository class for respositories that have acl support
 *
 * @package Custom_Model
 * @version $Id:$
 */
interface Custom_Model_AclRepositoryInterface
{
    /**
     * Set identity from current request
     *
     * @param array|string|null|Zend_Acl_Role_Interface $identity
     * @return App_Model_Abstract
     * @throws App_Model_Acl_Exception
     */
    public function setIdentity($identity);

    /**
     * Get identity. If no iden, uses 'guest'
     *
     * @return string
     */
    public function getIdentity();

    /**
     * Check the acl for given action
     *
     * @param string $action
     * @return boolean
     */
    public function checkAcl($action);

    /**
     *
     * Set the acl
     * @param Custom_Acl_Interface $acl
     */
    public function setAcl(Custom_Acl_Interface $acl);

    /**
     * Get the acl
     *
     * @return App_Acl_Interface
     */
    public function getAcl();

}